﻿using B.Z.BasicData.API.Read.DTO;
using B.Z.BasicData.Domain.Entity;
using B.Z.BasicData.ErrorCode;
using MediatR;

namespace B.Z.BasicData.API.Read.Application.User
{
    public class LoginQueryCommand : IRequest<APIResult<LoginDto>>
    {
        public string? UserName { get; set; }
        public string? Password { get; set; }
        
        /// <summary>
        /// 无参构造函数，用于模型绑定
        /// </summary>
        public LoginQueryCommand()
        {
        }
        
        /// <summary>
        /// 重写一下，为SignalR登录提供参数容器
        /// </summary>
        /// <param name="username"></param>
        /// <param name="password"></param>
        public LoginQueryCommand(string username, string password)
        {
            UserName = username;
            Password = password;
        }
    }

}
